#include<stdio.h>
#include"iostream"
using namespace std;

class Client{
protected:
	char nume_cl[40];
	int varsta;
public:
	Client(char name_cl[40],int age)
	{
		strcpy(nume_cl,name_cl);
		varsta=age;
	}
};

class Masina:public Client{
protected:
	char culoare[30],transmisie[30],nume[30];
public:
	Masina(char name_cl[40],int age,char name[30],char cul[30],char trs[30]):Client(name_cl,age)
	{
		strcpy(nume,name);
		strcpy(culoare,cul);
		strcpy(transmisie,trs);
	}

	virtual void dotari(char a[30],char b[30],char c[30])=0;
	virtual void dimensiune(float a,float b,float c)=0;
	virtual void motorizare(char tip[30],int cil)=0;
	
	virtual void afisare()=0;
};

class Sedan:public Masina{
protected:
	char tip1[30], tip2[30], tip3[30], tip[30];
	float h,l,L;
	int cilindree;
	char name_cl[40];
	int age;
public:
	Sedan(char name_cl[40],int age,char name[30],char cul[30],char trs[30]):Masina(name_cl,age,name,cul,trs){printf("- SEDAN\n");};

	void dotari(char a[30],char b[30],char c[30])
	{
		strcpy(tip1,a);
		strcpy(tip2,b);
		strcpy(tip3,c);
	}

	void dimensiune(float a,float b,float c)
	{
		h=a;
		l=b;
		L=c;
	}

	void motorizare(char tipe[30],int cil)
	{
		strcpy(tip,tipe);
		cilindree = cil;
	}

	void afisare()
	{
		printf("nume = %s, varsta = %d\n",nume_cl,varsta);

		printf("Marca = %s\n",nume);

		printf("Culoare = %s\n",culoare);

		printf("Transmisie = %s\n",transmisie);

		printf("DOTARI:%s, %s, %s\n",tip1,tip2,tip3);
			
		printf("DIMENSIUNI:\nInaltime = %.2fcm\nLatime = %.2fcm\nLungime = %.2fcm\n",h,l,L);

		printf("MOTORIZARE:\nTipMotor = %s\nCapacitateCilindrica = %d cm3\n\n\n\n",tip,cilindree);
	}
};

class Coupe:public Masina{
protected:
	char tip1[30], tip2[30], tip3[30], tip[30];
	float h,l,L;
	int cilindree;
	char name_cl[40];
	int age;
public:
	Coupe(char name_cl[40],int age,char name[30],char cul[30],char trs[30]):Masina(name_cl,age,name,cul,trs){printf("- COUPE\n");};

	void dotari(char a[30],char b[30],char c[30])
	{
		strcpy(tip1,a);
		strcpy(tip2,b);
		strcpy(tip3,c);
	}

	void dimensiune(float a,float b,float c)
	{
		h=a;
		l=b;
		L=c;
	}

	void motorizare(char tipe[30],int cil)
	{
		strcpy(tip,tipe);
		cilindree = cil;
	}

	void afisare()
	{
		printf("nume = %s, varsta = %d\n",nume_cl,varsta);

		printf("Marca = %s\n",nume);

		printf("Culoare = %s\n",culoare);

		printf("Transmisie = %s\n",transmisie);

		printf("DOTARI:%s, %s, %s\n",tip1,tip2,tip3);
			
		printf("DIMENSIUNI:\nInaltime = %.2fcm\nLatime = %.2fcm\nLungime = %.2fcm\n",h,l,L);

		printf("MOTORIZARE:\nTipMotor = %s\nCapacitateCilindrica = %d cm3\n\n\n\n",tip,cilindree);
	}
};

class Mini:public Masina{
protected:
	char tip1[30], tip2[30], tip3[30], tip[30];
	float h,l,L;
	int cilindree;
	char name_cl[40];
	int age;
public:
	Mini(char name_cl[40],int age,char name[30],char cul[30],char trs[30]):Masina(name_cl,age,name,cul,trs){printf("- MINI\n");};

	void dotari(char a[30],char b[30],char c[30])
	{
		strcpy(tip1,a);
		strcpy(tip2,b);
		strcpy(tip3,c);
	}

	void dimensiune(float a,float b,float c)
	{
		h=a;
		l=b;
		L=c;
	}

	void motorizare(char tipe[30],int cil)
	{
		strcpy(tip,tipe);
		cilindree = cil;
	}

	void afisare()
	{
		printf("nume = %s, varsta = %d\n",nume_cl,varsta);

		printf("Marca = %s\n",nume);

		printf("Culoare = %s\n",culoare);

		printf("Transmisie = %s\n",transmisie);

		printf("DOTARI:%s, %s, %s\n",tip1,tip2,tip3);
			
		printf("DIMENSIUNI:\nInaltime = %.2fcm\nLatime = %.2fcm\nLungime = %.2fcm\n",h,l,L);

		printf("MOTORIZARE:\nTipMotor = %s\nCapacitateCilindrica = %d cm3\n\n\n\n",tip,cilindree);
	}
};


int main()
{
	Sedan s("Ion Alexandru",23,"opel astra","rosu","manuala");
	s.dotari("climatronic","navigatie","scaune incalzite");
	s.dimensiune(164,220,480);
	s.motorizare("benzina",1598);
	s.afisare();

	Coupe c("Marian Voinic",27,"citroen c4","negru","manuala");
	c.dotari("climatronic","tapiterie piele","scaune incalzite");
	c.dimensiune(164,220,380);
	c.motorizare("diesel",1998);
	c.afisare();

	return 0;
}